#ifndef _HCC_ERROR_CODE_MID_SRT_STORAGE_H_
#define _HCC_ERROR_CODE_MID_SRT_STORAGE_H_

#include "ofc/ofc_types.h"
#include "hcc/hcc_error_code.h"
#include "hcc/hcc_error_code_mid.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_MID_SRT_STORAGE_ERROR(error_code) (int)HCC_MAKE_MID_WARE_ERROR(kHccMidWareSrtStorage, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_MID_WARE_ERROR(kHccMidWareSrtStorage, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * SrtStorage:
 */
enum THccMidSrtStorageErrorCodeEnumTag
{
	kHccMidWareSrtStorageSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccMidWareSrtStorageInvalidParam	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(1),			///<无效的参数
	kHccMidWareSrtStorageOutOfRange	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(2),			///<当前存储参数不在指定范围内
	kHccMidWareSrtStorageOutOfMem	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(3),			///<超出存储范围
	kHccMidWareSrtStorageNotEnoughOfMem	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(4),			///<读取可变长度时，给的内存不够
	kHccMidWareSrtStorageIdNotExists	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(5),			///<ID不存在
	kHccMidWareSrtStorageTypeNotMatch	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(6),			///<类型不匹配
	kHccMidWareSrtStorageNoInit	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(7),			///<存储未初始化
	kHccMidWareSrtStorageReadDevFailed	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(8),			///<读数据失败
	kHccMidWareSrtStorageWriteDevFailed	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(9),			///<写数据失败
	kHccMidWareSrtStorageRestoreFailed	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(10),			///<恢复参数失败
	kHccMidWareSrtStorageLockTimeOut	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(11),			///<加锁超时
	kHccMidWareSrtStorageMemMallocError	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(12),			///<分配内存错误
	kHccMidWareSrtStorageNoKey	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(13),			///<映射表中没有找到对应的KEY
	kHccMidWareSrtStorageDevNotOpen	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(14),			///<设备未打开
	kHccMidWareSrtStorageDevOpenFail	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(15),			///<打开设备失败
	kHccMidWareSrtStorageMemAllocFail	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(16),			///<内存分配失败
	kHccMidWareSrtStorageFail	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(17),			///<一般性错误
	kHccMidWareSrtStorageNotValue	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(18),			///<无有效值(未曾写过且未配置默认值)
	kHccMidWareSrtStorageIo	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(19),			///<IO错误
	kHccMidWareSrtStorageNotSupport	=	HCC_MAKE_MID_SRT_STORAGE_ERROR(20),			///<不支持的操作
};
typedef enum THccMidSrtStorageErrorCodeEnumTag THccMidSrtStorageErrorCodeEnum;


typedef Int32 THccMidSrtStorageErrorCodeEnumLine;
#define kHccMidWareSrtStorageSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccMidWareSrtStorageInvalidParamLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(1)	///<无效的参数
#define kHccMidWareSrtStorageOutOfRangeLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(2)	///<当前存储参数不在指定范围内
#define kHccMidWareSrtStorageOutOfMemLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(3)	///<超出存储范围
#define kHccMidWareSrtStorageNotEnoughOfMemLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(4)	///<读取可变长度时，给的内存不够
#define kHccMidWareSrtStorageIdNotExistsLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(5)	///<ID不存在
#define kHccMidWareSrtStorageTypeNotMatchLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(6)	///<类型不匹配
#define kHccMidWareSrtStorageNoInitLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(7)	///<存储未初始化
#define kHccMidWareSrtStorageReadDevFailedLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(8)	///<读数据失败
#define kHccMidWareSrtStorageWriteDevFailedLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(9)	///<写数据失败
#define kHccMidWareSrtStorageRestoreFailedLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(10)	///<恢复参数失败
#define kHccMidWareSrtStorageLockTimeOutLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(11)	///<加锁超时
#define kHccMidWareSrtStorageMemMallocErrorLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(12)	///<分配内存错误
#define kHccMidWareSrtStorageNoKeyLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(13)	///<映射表中没有找到对应的KEY
#define kHccMidWareSrtStorageDevNotOpenLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(14)	///<设备未打开
#define kHccMidWareSrtStorageDevOpenFailLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(15)	///<打开设备失败
#define kHccMidWareSrtStorageMemAllocFailLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(16)	///<内存分配失败
#define kHccMidWareSrtStorageFailLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(17)	///<一般性错误
#define kHccMidWareSrtStorageNotValueLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(18)	///<无有效值(未曾写过且未配置默认值)
#define kHccMidWareSrtStorageIoLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(19)	///<IO错误
#define kHccMidWareSrtStorageNotSupportLine	HCC_MAKE_MID_SRT_STORAGE_ERROR_LINE(20)	///<不支持的操作

#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_MID_SRT_STORAGE_H_
/**
 * @
 */
